<%@ page import="com.qf.entity.Admin" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/3/29
  Time: 16:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
    <title>学生管理系统</title>
    <script>
        //注销
        function logout() {
            location.href = "logout";
        }
    </script>
</head>

<body>
<%--<%--%>
<%--    Admin admin =(Admin) session.getAttribute("login_user");--%>
<%--    if (admin==null){--%>
<%--        //说明当前浏览器没有登录 ，强制到登录页--%>
<%--        response.sendRedirect("login.jsp");--%>
<%--        return;--%>
<%--    }--%>
<%--%>--%>
<%--<c:if test="${empty sessionScope.login_user}">--%>
<%--    <c:redirect url="login.jsp"/>--%>
<%--</c:if>--%>
<img style="width: 200px;height: 200px" src="headershow">
<h1>学生管理系统首页！欢迎${login_user.username}登录！</h1>
<button onclick="logout();">退出登录</button>
<hr/>
<div style="margin-top: 20px">
    <c:if test="${fn:contains(login_user.power, '1')}">
        <button onclick="javascrpit:location.href='querystudent'">学生列表</button>
    </c:if>
    
    <br/>
    <br/>
    <c:if test="${fn:contains(login_user.power,'2' )}">
        <button onclick="javascrpit:location.href='addstudent.jsp'">新增学生</button>
    </c:if>
    <br/>
    <br/>
    <button>删除用户</button>
</div>
</body>
</html>
